<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.active{
				color: red;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<!-- 需求点击哪项,该项变红色 -->
			<ul>
				<li v-on:click="" v-bind:style="red" v-for="(item,index) in movies">
					{{index}}-{{item}}
				</li>
			</ul>
		</div>
	</body>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript"> 
		const app = new Vue({
			el: "#app",
			data: {
				isActive : [],
				movies : [
					'海王',
					'海尔兄弟',
					'火影忍者',
					'海贼王'
				]
			},
			methods:{
				liClick : function(){
					this.isActive = !this.isActive;
				}
			}
		})
	</script>
</html>
